package PTA_JAVA.Exception.Exception01;

import java.util.Arrays;
import java.util.Scanner;

import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[] arr=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=sc.nextInt();
        }
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));

        double avg=0;
        double sum=0;
        for(int i=n-1;i>=0;i--){
            System.out.print(arr[i]+" ");
            avg+=arr[i];
            sum+=arr[i]*arr[i]*Math.PI;
        }
        avg=avg/n;
        System.out.println();
        System.out.println("平均半径="+avg);
        System.out.printf("总面积=%.6f\n",sum);
    }
}
